{*
 * This file is part of the Agora distribution. 
 * Detailed copyright and licensing information can be found
 * in the gpl-3.0.txt file which should be included in the distribution.
 * 
 * @version		$Id: 3.0.14 Olympus 2010-09-28 rammstein4o $
 * @copyright  2007 - 2010 jVitals
 * @license   GPLv3 Open Source
 * @link       http://jvitals.com
 * @since      File available since initial release
 *}	

<div style="float:left; width: 10%;">
	{include file=maintenance/links.tpl}
</div>

{$html->toolbar->title('##Style CSS editor##')}
{$html->toolbar->save()}
{$html->toolbar->cancel()}

<div style="float:right; width: 90%;">
{*
	{script src='js/editarea/edit_area_compressor.php'}

	{literal}
	<script language="javascript" type="text/javascript">
		function initEditor(name)
		{
			if (document.getElementById(name).style.visibility=='hidden') {
				editAreaLoader.init({
					id : name		// textarea id
					,syntax: "css"			// syntax to be uses for highgliting
					,start_highlight: true		// to display with highlight mode on start-up
					,allow_toggle: false
					,min_height: 500
					,gecko_spellcheck: false
					,allow_resize: false
					,language: "en"
				});
				document.getElementById(name).style.visibility = 'visible';
			}
		}

		window.addEvent('domready',function() {
/*			document.getElementById('p_1').onclick = function() {
				initEditor('style_index');
			}*/

			document.getElementById('p_2').onclick = function() {
				initEditor('style_common');
			}

			document.getElementById('p_3').onclick = function() {
				initEditor('style_profile');
			}

			window.addListener('beforeunload', function() {
				editAreaLoader.delete_instance('style_index');
			});

			initEditor('style_index');
		});

		function saveEditors()
		{
			alert('123');
		}
	</script>
	{/literal}
*}
	<form name="adminForm" method="POST">
		<select name="style"  onchange="window.location=('{url task=maintenance page=css_editor}&amp;style='+this.options[this.selectedIndex].value)">
			{foreach from=$styles item=list_style}
			<option value="{$list_style}" {if $current_style eq $list_style}selected="1"{/if}>{$list_style}</option>
			{/foreach}
		</select>
		##Select style to edit##

		<br />

		{$html->form->param('option','com_agora')}
		{$html->form->param('agora_task','maintenance')}
		{$html->form->param('task','maintenance')}
		{$html->form->param('action','')}

		{pane name=CssPane type=Tabs startOffset=0}
			{panel lang=Index id=p_1}
				<textarea name="form[index]" style="height: 350px; width:100%; visibility: visible" id="style_index">{$style.index}</textarea>
			{/panel}
			{panel lang=Common id=p_2}
				<textarea name="form[common]" style="height: 350px; width:100%; visibility: visible" id="style_common">{$style.common}</textarea>
			{/panel}
			{panel lang=Profile id=p_3}
				<textarea name="form[profile]" style="height: 350px; width:100%; visibility: visible" id="style_profile">{$style.profile}</textarea>
			{/panel}
		{/pane}
	</form>
</div>